﻿<local:AnimatedRotatePhoneApplicationPage
    x:Class="Google_Plus.Pages.Notifications"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:Google_Plus.Types"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True"
    toolkit:TiltEffect.IsTiltEnabled="True"
    Loaded="AnimatedRotatePhoneApplicationPage_Loaded">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <TextBlock VerticalAlignment="Top" Margin="15,5,0,0" Text="Google+"/>
        <TextBlock VerticalAlignment="Top" Margin="11,17,0,0" Text="Notifications" FontSize="64"/>
        <ListBox ItemsSource="{Binding Notifications}" 
                 Margin="5,100,0,0" Name="NotificationsList">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel DataContext="{Binding}" Tap="Grid_Tap"
                          Background="{Binding Background}">
                        <local:RichTextHelper Margin="10,5" 
                                              FontSize="22"
                                              RichText="{Binding LineOne}" 
                                              TextWrapping="NoWrap" />
                        <Grid>
                            <ItemsControl ItemsSource="{Binding Images}">
                                <ItemsControl.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <StackPanel Orientation="Horizontal"/>
                                    </ItemsPanelTemplate>
                                </ItemsControl.ItemsPanel>
                                <ItemsControl.ItemTemplate>
                                    <DataTemplate>
                                        <Image Width="64" Height="64"
                                           Margin="10"
                                           Source="{Binding}"/>
                                    </DataTemplate>
                                </ItemsControl.ItemTemplate>
                            </ItemsControl>
                            <Image Width="64" Height="64" 
                               HorizontalAlignment="Left" 
                               VerticalAlignment="Center" 
                               Margin="10"
                               Source="{Binding Image}"/>
                            <local:RichTextHelper Margin="90,10,20,10"
                                                  FontSize="22" 
                                                  RichText="{Binding LineTwo}" />
                        </Grid>
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
            <ListBox.ItemContainerStyle>
                <Style TargetType="ListBoxItem">
                    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                </Style>
            </ListBox.ItemContainerStyle>
        </ListBox>
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
            <shell:ApplicationBarMenuItem Text="Log out" Click="Logout_Click"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</local:AnimatedRotatePhoneApplicationPage>
